package com.lx.util;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @ClassName: applicationUtil
 * @Description:
 * @Date Created in  2021-08-26 10:59
 * @Modified By:
 * @Author: 零巽
 */
public class ApplicationUtil {
    /**
     * 加载spring配置文件的工具
     * @return applicationContext
     */
    public static ApplicationContext loadApplicationContext(){
        //配置文件資源文件名
        String springConfig = "application.xml";
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext(springConfig);
        return applicationContext;
    }
}
